package org.dawnframework.context.annotation;


import org.dawnframework.beans.factory.config.BeanDefinition;
import org.dawnframework.beans.factory.support.AbstractApplicationContext;

/**
 *应用注解程序上下文
 * @author baiml
 * @since 0.1
 */
public class AnnotationConfigApplicationContext extends GenericApplicationContext implements AnnotationConfigRegistry {

    private final AnnotatedBeanDefinitionReader reader;

    private final ClassPathBeanDefinitionScanner scanner;

    public AnnotationConfigApplicationContext() {
        reader = new AnnotatedBeanDefinitionReader(this);
        scanner = new ClassPathBeanDefinitionScanner();
    }

    public AnnotationConfigApplicationContext(Class<?>... componentClasses) {
        this();
        register(componentClasses);
        refresh();
    }


    @Override
    public void register(Class<?>... componentClasses) {
        this.reader.register(componentClasses);
    }

    @Override
    public void scan(String... basePackages) {


    }

    @Override
    public void refresh() {

    }


}
